<!DOCTYPE html>
<html class="no-js" lang="zxx">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="meta description">

    <title>Dream游戏商城-首页</title>

    <!--=== Favicon ===-->
    <link rel="shortcut icon" href="assets/img/favicon.ico" type="image/x-icon"/>

    <!--== Google Fonts ==-->
    <link href="https://fonts.googleapis.com/css?family=Poppins:300,400,400i,500,600,700" rel="stylesheet">

    <!--=== Bootstrap CSS ===-->
    <link href="assets/css/vendor/bootstrap.min.css" rel="stylesheet">
    <!--=== Font-Awesome CSS ===-->
    <link href="assets/css/vendor/font-awesome.css" rel="stylesheet">
    <!--=== Plugins CSS ===-->
    <link href="assets/css/plugins.css" rel="stylesheet">
    <!--=== Helper CSS ===-->
    <link href="assets/css/helper.min.css" rel="stylesheet">
    <!--=== Main Style CSS ===-->
    <link  href="assets/css/swiper-bundle.min.css" rel="stylesheet">

    <link href="assets/css/style.css" rel="stylesheet">

    <!-- Modernizer JS -->
    <script src="assets/js/vendor/modernizr-2.8.3.min.js"></script>


<!--    <link rel="stylesheet" href="https://unpkg.com/swiper@8/swiper-bundle.min.css">

    <script src="https://unpkg.com/swiper@8/swiper-bundle.min.js"> </script>-->



    <script src="assets/js/swiper-bundle.min.js"></script>


    <!--[if lt IE 9]>
    <script src="http://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="http://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->

    <style>
        .swiper {
            width: 100%;
            height: 30%;
        }

        .swiper-slide {
            text-align: center;
            font-size: 18px;
            /*background: #fff;*/
            /*background: #0C0C0C;*/

            /* Center slide text vertically */
            display: -webkit-box;
            display: -ms-flexbox;
            display: -webkit-flex;
            display: flex;
            -webkit-box-pack: center;
            -ms-flex-pack: center;
            -webkit-justify-content: center;
            justify-content: center;
            -webkit-box-align: center;
            -ms-flex-align: center;
            -webkit-align-items: center;
            align-items: center;
        }

        .swiper-slide img {
            display: block;
            width: 100%;
            height: 400px;
            object-fit: cover;
        }

        body{
            background-color: #3B4348;
        }
		#logo{
			background-color:black
		}
    </style>
</head>
</head>


<body>


<!--== 头部菜单开始 ==-->
<header id="header-area">
    <!-- Start PreHeader Area -->
    <div class="preheader-area">
        <div class="container">
            <div class="row">
                <div class="col-md-5 col-lg-6">
                    <div class="preheader-contact-info d-flex align-items-center justify-content-between justify-content-md-start">
                        <div class="single-contact-info">
                            <span class="contact-icon">
                                <i class="fa fa-envelope"></i>
                            </span>
                       
                                    <strong>Email:</strong> Dream@email.here
                                </a>
                            </div>
                            <div class="single-contact-info">
                                <span class="contact-icon">
                                    <i class="fa fa-phone"></i>
                                </span>
                                <a href="" class="contact-text">
                                    <strong>电话:</strong> (+86) 188-8888-8888
                            </a>
                        </div>
                    </div>
                </div>

                <div class="col-md-7 col-lg-6 mt-xs-10">
                    <div class="site-setting-menu">
                        <ul class="nav justify-content-center justify-content-md-end">
                            <li><a href="my-account.html">个人中心</a></li>
                            <li><a href="order.html">查看订单</a></li>
                            <li><a  id="logout" href="" >注销登录</a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- End PreHeader Area -->

    <!-- Start Header Middle Area -->
    <div class="header-middle-area">
        <div class="container">
            <div class="row">
                <!-- Logo Area Start -->
                <div class="col-4 col-md-2 col-xl-3 m-auto text-center text-lg-left">
                    <a href="index.html" class="logo-wrap d-block">
                        <img src="assets/img/logo.png" alt="Logo" class="img-fluid"/>
                    </a>
                </div>
                <!-- Logo Area End -->

<!--                &lt;!&ndash; 查询 Box Area Start &ndash;&gt;-->
<!--                <div class="col-8 col-md-7 col- m-auto ">-->
<!--                    <div class="search-box-wrap">-->
<!--                        <form class="search-form d-flex" action="#" method="get">-->
<!--                            <input type="search" name="search" placeholder="搜索游戏"/>-->
<!--                            <button class="btn btn-search"><img src="assets/img/icons/icon-search.png"-->
<!--                                                                alt="Search Icon"/>-->
<!--                            </button>-->
<!--                        </form>-->
<!--                    </div>-->
<!--                </div>-->
<!--                &lt;!&ndash; 查询 Box Area End &ndash;&gt;-->
            </div>
        </div>
    </div>
    <!-- End Header Middle Area -->

    <!-- 分类模块开始 -->
    <div class="navigation-area" id="fixheader">
        <div class="container">
            <div class="row">
                <!-- 分类 List Start -->
                <div class="col-10 col-lg-3">
                    <div class="categories-list-wrap">
                        <button class="btn btn-category d-none d-lg-inline-block"><i class="fa fa-bars"></i> 分类
                        </button>
                        <ul class="category-list-menu">
                            <li class="category-item-parent dropdown-show">
                                <a href="#" class="category-item arrow-toggle">
                                    <img src="assets/img/icons/games.png" alt="Mobile"/>
                                    <span>游戏分类</span>
                                </a>
                                <ul id="gametype" class="mega-menu-wrap dropdown-nav">
                                </ul>
                            </li>


                        </ul>
                    </div>
                </div>
                <!-- 分类 List End -->

                <!-- Main Menu Start -->
                <div class="col-2 col-lg-9 d-none d-lg-block">
                    <div class="main-menu-wrap">
                        <nav class="mainmenu">
                            <ul class="main-navbar clearfix">
                                <li class="dropdown-show"><a href="index.html"
                                                             class="">首页</a>
                                    <ul class="dropdown-nav sub-dropdown">

                                    </ul></li>
                                <li><a href="about.html">关于我们</a></li>


                                <li class="dropdown-show"><a href="#" class="arrow-toggle">更多</a>
                                    <ul class="dropdown-nav">
                                        <li><a href="shoppingcart.html">购物车</a></li>
                                        <li><a href="my-account.html">个人中心</a></li>
                                    </ul>
                                </li>
                            </ul>
                        </nav>
                    </div>
                </div>
                <!-- Main Menu End -->
            </div>
        </div>
    </div>
    <!-- End Main Menu Area -->
    </div>
    </div>
    </div>
    <!-- End Main Menu Area -->
</header>
<!--== End Header Section ==-->

<!--== Start Slider Area ==-->
<div class="slider-area-wrap">
    <div class="home-slider-carousel owl-carousel">
        <div class="single-slide-item">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="slider-text">
                            <h2>艾尔登法环</h2>
                            <h3>宫崎英高又一力作</h3>
                            <h4>剑与魔法</h4>
                            <a href="#" class="btn">特别好评</a>

                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="single-slide-item slide-item_2">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="slider-text">
                            <h2>荒野大镖客2</h2>
                            <h3>体验19年代美国西部淳朴民风</h3>
                            <h4>西部大善人</h4>
                            <a href="#" class="btn">好评如潮</a>

                        </div>
                    </div>
                </div>
            </div>
        </div>

        <div class="single-slide-item slide-item_3">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="slider-text">
                            <h2>Gta5</h2>
                            <h3>你可以没去过美国，但你一定不能没去过洛圣都</h3>
                            <h4>五星市民</h4>
                            <a href="#" class="btn">特别好评</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<!--== End Slider Area ==-->

<!--== Start Call To Action ==-->
<section id="call-to-action">
    <div class="container">
        <div class="call-to-action-content">
            <div class="row">
                <!-- Single Call to Action Start -->
                <div class="col-lg-3 col-sm-6 m-auto">
                    <div class="single-action-item d-flex align-items-center">
                        <div class="call-action-icon">
                            <i class="fa fa-truck"></i>
                        </div>
                        <div class="call-action-info">
                            <h4>快速发货</h4>
                            <p>秒到库存</p>
                        </div>
                    </div>
                </div>
                <!-- Single Call to Action End -->

                <!-- Single Call to Action Start -->
                <div class="col-lg-3 col-sm-6">
                    <div class="single-action-item d-flex align-items-center">
                        <div class="call-action-icon">
                            <i class="fa fa-support"></i>
                        </div>
                        <div class="call-action-info">
                            <h4>绝对安全可靠</h4>
                            <p>值得信赖</p>
                        </div>
                    </div>
                </div>
                <!-- Single Call to Action End -->

                <!-- Single Call to Action Start -->
                <div class="col-lg-3 col-sm-6">
                    <div class="single-action-item d-flex align-items-center">
                        <div class="call-action-icon">
                            <i class="fa fa-calendar"></i>
                        </div>
                        <div class="call-action-info">
                            <h4>新品更新</h4>
                            <p>随时查看</p>
                        </div>
                    </div>
                </div>
                <!-- Single Call to Action End -->

                <!-- Single Call to Action Start -->
                <div class="col-lg-3 col-sm-6">
                    <div class="single-action-item d-flex align-items-center">
                        <div class="call-action-icon">
                            <i class="fa fa-refresh"></i>
                        </div>
                        <div class="call-action-info">
                            <h4>游玩2小时内无理由退货</h4>
                            <p>信誉保证</p>
                        </div>
                    </div>
                </div>
                <!-- Single Call to Action End -->
            </div>
        </div>
    </div>
</section>
<!--== End Call To Action ==-->

<!--== Start Products  Area ==-->


<!-- Start Sale Banner Area -->
<div class="banner-area">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <a href="#">
                    <img src="assets/img/banner-home-one.png" alt="Banner"/>
                </a>
            </div>
        </div>
    </div>
</div>
<!-- End Sale Banner Area -->

<!-- Start Product By Category -->
<section id="productsby-category">
    <div class="container">
        <div class="productby-cate-content">
            <div class="row">
                <!-- Single Category Product Start -->
                <div class="col-lg-6">
                    <div class="category-product-wrap">
                        <h4 class="cate-pro-title"><a href="#">PC</a></h4>
                        <figure class="cat-banner">
                            <a href="#"><img src="assets/img/PC.jpg" alt="Category"></a>
                        </figure>

                        <div class="products-wrapper">
                            <div class="cat-pro-carousel owl-carousel">
                                <!-- JOIN下面的手机展示开始[左半部分] -->
                                <!-- 1299.99下面的手机展示开始[左边半部分] -->

                                <div class="single-product-item">
                                    <figure class="product-thumb">
                                        <a href="#"><img src="assets/img/anhei3.jpg"
                                                                          alt="Product"></a>


                                    </figure>

                                    <div class="product-details">
                                        <h2 class="product-title"><a href="#">暗黑破化神3</a></h2>
                                        <div class="rating">
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                        </div>
                                        <span class="product-price">100元</span>
                                        <div class="product-meta">


                                        </div>
                                    </div>
                                </div>

                                <!-- 1299.99下面的手机展示结束[左边半部分]-->
                                <!-- JOIN下面的手机展示结束[左半部分]-->
                            </div>
                        </div>
                    </div>
                </div>
                <!-- Single Category Product End -->

                <!-- Single Category Product Start -->
                <div class="col-lg-6">
                    <div class="category-product-wrap">
                        <h4 class="cate-pro-title"><a href="#">Xbox</a></h4>
                        <figure class="cat-banner">
                            <a href="#"><img src="assets/img/xbox.png" alt="Category"></a>
                        </figure>

                        <div class="products-wrapper">
                            <div class="cat-pro-carousel owl-carousel">
                                <!-- JOIN下面的手机展示开始[右半部分] -->
                                <!-- 1299.99下面的手机展示开始[左边半部分] -->

                                <div class="single-product-item">
                                    <figure class="product-thumb">
                                        <a href="#"><img src="assets/img/huanxiang.jpg"
                                                                          alt="Product"></a>


                                    </figure>

                                    <div class="product-details">
                                        <h2 class="product-title"><a href="#">最终幻想14：重生之境</a></h2>
                                        <div class="rating">
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                        </div>
                                        <span class="product-price">400 元</span>
                                        <div class="product-meta">


                                        </div>
                                    </div>
                                </div>

                                <!-- 1299.99下面的手机展示结束[左边半部分]-->
                                <!-- JOIN下面的手机展示结束[右半部分]-->
                            </div>
                        </div>
                    </div>
                </div>
                <!-- Single Category Product End -->

                <!-- Single Category Product Start -->
                <div class="col-lg-6">
                    <div class="category-product-wrap">
                        <h4 class="cate-pro-title"><a href="#">Switch</a></h4>
                        <figure class="cat-banner">
                            <a href="#"><img src="assets/img/switch.jpg" alt="Category"></a>
                        </figure>

                        <div class="products-wrapper">
                            <div class="cat-pro-carousel owl-carousel">
                                <!-- 1299.99下面的手机展示开始[左边半部分] -->

                                <div class="single-product-item">
                                    <figure class="product-thumb">
                                        <a href="#"><img src="assets/img/sed.jpg"
                                                                          alt="Product"></a>


                                    </figure>

                                    <div class="product-details">
                                        <h2 class="product-title"><a href="#">塞尔达传说旷野之息</a></h2>
                                        <div class="rating">
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                        </div>
                                        <span class="product-price">300元</span>
                                        <div class="product-meta">

                                        </div>
                                    </div>
                                </div>

                                <!-- 1299.99下面的手机展示结束[左边半部分]-->
                            </div>
                        </div>
                    </div>
                </div>
                <!-- Single Category Product End -->

                <!-- Single Category Product Start -->
                <div class="col-lg-6">
                    <div class="category-product-wrap">
                        <h4 class="cate-pro-title"><a href="#">Mobile</a></h4>
                        <figure class="cat-banner">
                            <a href="#"><img src="assets/img/yuanpi.gif" alt="Category"></a>
                        </figure>

                        <div class="products-wrapper">
                            <div class="cat-pro-carousel owl-carousel">
                                <!-- 1299.99下面的手机展示开始[右半部分] -->


                                <div class="single-product-item">
                                    <figure class="product-thumb">
                                        <a href="#"><img src="assets/img/fangzhou.jpg"
                                                                          alt="Product"></a>


                                    </figure>

                                    <div class="product-details">
                                        <h2 class="product-title"><a href="#">明日方舟</a></h2>
                                        <div class="rating">
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                            <i class="fa fa-star"></i>
                                        </div>
                                        <span class="product-price">100元</span>
                                        <div class="product-meta">


                                        </div>
                                    </div>
                                </div>

                                <!-- 1299.99下面的手机展示结束[右半部分]-->
                            </div>
                        </div>
                    </div>
                </div>
                <!-- Single Category Product End -->



                <!-- Single Category Product Start -->
                <div class="col-lg-6">
                    <div class="category-product-wrap">
                        <h4 class="cate-pro-title"><a href="game.html">最新游戏</a></h4>
                        <figure class="cat-banner">
                            <a href="shop.html">
                                <div  class="swiper">
                                    <!--                                <h2>新上架的游戏</h2>-->
                                    <div id="newgame" class="swiper-wrapper">
                                        <!--        <img id="fireimg" class="gameimg">-->
                                    </div>


                                </div>
                            </a>
                        </figure>
                        <div class="products-wrapper">
                            <div class="cat-pro-carousel owl-carousel">
                                <!-- Mobile下面的手机展示开始[右边半部分] -->



                                <!-- Mobile下面的手机展示结束[右边半部分]-->
                            </div>
                        </div>

                    </div>
                </div>
                <!-- Single Category Product End -->

                <!-- Single Category Product Start -->
                <div class="col-lg-6">
                    <div class="category-product-wrap">
                        <h4 class="cate-pro-title"><a href="game.html">热销游戏</a></h4>
                        <figure class="cat-banner">
                            <a href="game.html">
                                <div class="swiper">
                                    <div id="firegame" class="swiper-wrapper">
                                        <!--        <img id="fireimg" class="gameimg">-->
                                    </div>
                                </div>
                            </a>
                        </figure>
                        <div class="products-wrapper">
                            <div class="cat-pro-carousel owl-carousel">
                                <!-- Mobile下面的手机展示开始[右边半部分] -->



                                <!-- Mobile下面的手机展示结束[右边半部分]-->
                            </div>
                        </div>

                    </div>
                </div>

            </div>
        </div>
    </div>
</section>
<!-- End Product By Category -->

<!--== Start Brand Carousel Area ==-->
<div class="brand-logo-area">
    <div class="container">
        <div class="row">
            <div class="col-lg-12">
                <div class="brand-logo-carousel owl-carousel" id ="logo">
                    <!-- Single Brand Logo Start -->
                    <div class="single-brand-item">
                        <a href="#"><img src="assets/img/logo-1.png" alt="brand"></a>
                    </div>
                    <!-- Single Brand Logo End -->

                    <!-- Single Brand Logo Start -->
                    <div class="single-brand-item">
                        <a href="#"><img src="assets/img/logo-2.png" alt="brand"></a>
                    </div>
                    <!-- Single Brand Logo End -->

                    <!-- Single Brand Logo Start -->
                    <div class="single-brand-item">
                        <a href="#"><img src="assets/img/logo-3.png" alt="brand"></a>
                    </div>
                    <!-- Single Brand Logo End -->

                    <!-- Single Brand Logo Start -->
                    <div class="single-brand-item">
                        <a href="#"><img src="assets/img/logo-4.png" alt="brand"></a>
                    </div>
                    <!-- Single Brand Logo End -->

                    <!-- Single Brand Logo Start -->
                    <div class="single-brand-item">
                        <a href="#"><img src="assets/img/logo-5.png" alt="brand"></a>
                    </div>
                    <!-- Single Brand Logo End -->

                    <!-- Single Brand Logo Start -->
                    <div class="single-brand-item">
                        <a href="#"><img src="assets/img/logo-6.png" alt="brand"></a>
                    </div>
                    <!-- Single Brand Logo End -->
                </div>
            </div>
        </div>
    </div>
</div>
<!--== End Brand Carousel Area ==-->

<!--== Start Newsletter Area ==-->
<div class="newsletter-area">
    <div class="container">
        <div class="row">
            <div class="col-lg-9 m-auto">
                <!-- Newsletter Content Start -->
                <div class="newsletter-content-wrap text-center text-lg-left d-lg-flex">
                    <h2><i class="fa fa-envelope-square"></i> Sign up for Newsletter</h2>
                    <!--<div class="newsletter-form-wrap">
                        <form id="subscribe-form" action="assets/php/subscribe.php" method="post">
                            <input type="email" name="newsletter_email" id="address" placeholder="Enter Your Email Address" required />
                            <button class="btn" type="submit">Subscribe</button>
                        </form>
                        <!- Show Error & Success Message -->
                    <!--<div id="subscribeResult"></div>
                </div>-->
                </div>
                <!-- Newsletter Content End -->
            </div>

            <div class="col-lg-3 m-auto text-center text-lg-right">
                <!-- Social Icons Area Start -->
                <div class="social-icons">
                    <a href="#"><i class="fa fa-facebook"></i></a>
                    <a href="#"><i class="fa fa-twitter"></i></a>
                    <a href="#"><i class="fa fa-linkedin"></i></a>
                    <a href="#"><i class="fa fa-youtube"></i></a>
                </div>
                <!-- Social Icons Area End -->
            </div>
        </div>
    </div>
</div>
<!--== End Newsletter Area ==-->

<!--== Start Footer Area ==-->
<footer id="footer-area">
    <!-- Footer Widget Area Start -->
    <div class="footer-widget-area">
        <div class="container">
            <div class="footer-widget-content">
                <div class="row">

                    <!-- Single Widget-item Start -->
                    <div class="col-lg-3 col-sm-6">
                        <div class="single-widget-item">
                           <h3 class="widget-title">Dream&Game</h3>
                           <div class="widget-body">
                               <div class="contact-info">
                                   <div class="single-contact-info">
                                   <span class="contact-icon">
                                       <i class="fa fa-home"></i>
                                   </span>
                                       <a href="#" class="contact-text">
                                           <strong>地址:</strong> 中国, 福建, 厦门
                                       </a>
                                   </div>
                                   <div class="single-contact-info">
                                   <span class="contact-icon">
                                       <i class="fa fa-phone"></i>
                                   </span>
                                       <a href="#" class="contact-text">
                                           <strong>电话:</strong> (+86) 188-8888-8888
                                       </a>
                                   </div>
                                   <div class="single-contact-info">
                                   <span class="contact-icon">
                                       <i class="fa fa-envelope"></i>
                                   </span>
                                       <a href=#" class="contact-text">
                                           <strong>Email:</strong>Dream@email.here
                                        </a>
                                    </div>
                                    
                                        
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- Single Widget-item End -->
                </div>
            </div>
        </div>
    </div>
    <!-- Footer Widget Area End -->

    <!-- Footer Bottom Area -->
    <div class="footer-bttom-area">
        <div class="container">
            <div class="row">
                <!-- Copyright Text Area -->
                <div class="col-md-6 m-auto text-center text-md-left order-last order-md-first">
                    <p>版权所有 &copy; 2022.Dream游戏商城 保留所有权利。</p>
                </div>
                <!-- Copyright Text Area -->

                <!-- Payment Method Area -->
                <div class="col-md-6 m-auto text-center text-md-right">
                    <div class="payment-support">
                        <img src="assets/img/payment.png" alt="Payment" class="d-inline-block" />
                    </div>
                </div>
                <!-- Payment Method Area -->
            </div>
        </div>
    </div>
    <!-- Footer Bottom Area -->
</footer>
<!--== End Footer Area ==-->

<!-- Scroll to Top Start -->
<a href="#" class="scrolltotop"><i class="fa fa-angle-up"></i></a>
<!-- Scroll to Top End -->




<!--=======================Javascript============================-->
<!--=== Jquery Min Js ===-->
<script src="assets/js/vendor/jquery-3.3.1.min.js"></script>
<!--=== Jquery Migrate Min Js ===-->
<script src="assets/js/vendor/jquery-migrate-1.4.1.min.js"></script>
<!--=== Popper Min Js ===-->
<script src="assets/js/vendor/popper.min.js"></script>
<!--=== Bootstrap Min Js ===-->
<script src="assets/js/vendor/bootstrap.min.js"></script>
<!--=== Ajax Mail Js ===-->
<script src="assets/js/ajax-mail.js"></script>
<!--=== Plugins Min Js ===-->
<script src="assets/js/plugins.js"></script>

<!--=== Active Js ===-->
<script src="assets/js/active.js"></script>

<script src="js/jquery-2.1.0.js"></script>

<script type="text/javascript">
    var swiper = new Swiper('.swiper', {
        autoplay: true,
        loop: false,
    });

    $(document).ready(function() {
        getFireImgs();

        getNewImgs();

        getTypes();

        $(document).on("click",".mega-item-title", function()  {
            let typeid=$(this).attr("value");
            console.log("typeid"+typeid);

            $.ajax({
                url: "http://localhost:8080/dreamgame/gametype/type/" +typeid,
                async: true,
                dataType: "json",
                type: "get",
                success: (r) => {
                    window.location.href = "game.html";
                }
            })
        })
    })

    //获取热销游戏数据的方法
    function getFireImgs() {
        $.ajax({
            url:"http://localhost:8080/dreamgame/game/fire",

            async:true,

            dataType:"json",

            type:"get",

            success:(r)=>{

                let list=r.data;

                for (let g of list) {
                    // fireimages.push(g.game_img);
                    let str=`<div class="swiper-slide">
                                <img src='http://rjgs8gsgn.hn-bkt.clouddn.com/${g.game_img}'>
                                </div>`;
                    $("#firegame").append(str);
                }

            }
        })
    };

    //获取新游戏的方法
    function getNewImgs() {
        $.ajax({
            url:"http://localhost:8080/dreamgame/game/new",
            async:true,
            dataType:"json",
            type:"get",
            success:(r)=>{
                console.log(r);
                let list=r.data;
                for (let g of list) {
                    let str=`<div class="swiper-slide">
                                <img src='http://rjgs8gsgn.hn-bkt.clouddn.com/${g.game_img}'>
                                </div>`;
                    $("#newgame").append(str);
                }
            }
        })
    };

    //获取游戏类型的方法
    function getTypes() {
        $.ajax({
            url:"http://localhost:8080/dreamgame/gametype/gettypes",
            async:true,
            dataType:"json",
            type:"get",
            success:(r)=>{
                console.log("r："+r)
                let list=r.data;
                console.log("游戏类型"+ list);
                for (let t of list) {
                    console.log(t);
                    let str=`  <li class="mega-menu-item">
                        <a href="#" value="${t.typeid}" class="mega-item-title">${t.typename}</a>
                        </li>`;
                    console.log(str);
                    $("#gametype").append(str);
                }

            }
        })
    }

    $("#logout").click(function logout() {
        // console.log("调用登出方法");
        $.ajax({
            url: "http://localhost:8080/dreamgame/user/loginout",
            async: true,
            dataType: "json",
            type: "post",
            success: (r) => {
                alert(r.msg);
                window.location.href = "login.html";
            }
        })
    });
</script>
</body>
</html>
